/*************************************************************************
	> File Name: client.cpp
	> Author: ma6174
	> Mail: ma6174@163.com 
	> Created Time: 2021年12月09日 星期四 20时34分40秒
 ************************************************************************/

#include "handle.h"
using namespace std;

int main()
{
	Handler* h1 = new ConcreteHandler1();
	Handler* h2 = new ConcreteHandler2();
	Handler* h3 = new ConcreteHandler3();

	h1->setSuccessor(h2);
	h2->setSuccessor(h3);

	int arr[8] = {2, 5, 14, 22, 18, 3, 27, 20};

	for (int i = 0; i < 8; ++i)
		h1->handleRequest(arr[i]);

	return 0;
}
